home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / 422mods.zip / WCF_SCR.422 < prev    next >
Text File  |  1993-03-15  |  11KB  |  295 lines

  1. WFC_SCRN.MOD - From ICENEWS - Feb 1993
  2. 4Odin #1 @76640       2─═7[4SysOp7]2═─
  3. 2Wednesday 03/10/93 710:07p
  4. ┌──────────────────────────────────────────────────────────────────────┐
  5. │Name:   WFCSCRN.MOD                                                   │
  6. │Author: Odin #1@7664 (IceNET) - C stuff    (My first 4.22 mod!)       │
  7. │        Jim #1@1 (IceNET)     - Ansi                                  │
  8. │Version: 4.22                                                         │
  9. │Files Affected:  BBS.C - hey nice huh?                                │
  10. │Difficulty:  ▓░░░░░░ - A monkey can do this one!                      │
  11. │Description:  Are you tired of the blinking cursor at the top of your │
  12. │              WFC (waiting for call) screen.  Well here is a nice     │
  13. │              record of your BBS while your board is inactive.        │
  14. └──────────────────────────────────────────────────────────────────────┘
  15.  
  16. This mod has an on-screen clock using the computer clock.  It shows the
  17. time in standard form (i.e. 3:30am).  This mod also has a built in screen saver.
  18. The status box will move around the screen.  It will  return to its "home" 1/3
  19. of the time. I like it though, so think before killing.  Any colors not
  20. desired may be fixed by using code similar to the one marked /*SELECT COLOR*/
  21. If you wish more colors to be excuded, duplicate the line and change the
  22. numbers.
  23.  
  24. STEP 1:  BACK UP YOUR SOURCES
  25. ------
  26.  
  27. STEP 2:  Load in BBS.C and locate "void getcaller"
  28. ------
  29.  
  30. Before this line, block copy the following void into BBS.C:
  31.  
  32. void wfc_window(int NoScreen)
  33. {
  34.   int am, i, wx, wy, width, len, tmp, clr1, clr2, Imove;
  35.   char otstr[30], d_o_w[3], day;
  36.   double d;
  37.   long hr, min,l, totspace;
  38.   float ftmp;
  39.   if(!NoScreen) {
  40.     run_external1_x("ICE");
  41.     d=timer();
  42.     ftmp=d/3600.0;
  43.     hr=(int) ftmp;
  44.     ftmp=60.0*(ftmp-(float) hr);
  45.     min=(int) ftmp;
  46.     am=1;
  47.     Imove=rand() % 3;                                             /*MOVE*/
  48.     if(hr>11){
  49.       am=0;
  50.       hr=hr-12;
  51.     }
  52.     if(hr==0)
  53.       hr=12;
  54.     wx=12;
  55.     wy=6;
  56.     if(Imove<2) {                                                 /*MOVE*/
  57.       wx=rand() % 24;                                             /*MOVE*/
  58.       wy=rand() % 11;                                             /*MOVE*/
  59.     }                                                             /*MOVE*/
  60.     width=55;
  61.     len=9;
  62.     randomize();
  63.     clr1=rand() % 10;
  64.     clr2=rand() % 10;
  65.     if(clr1==6) clr1=1;    /*Changes red to blue */       /*SELECT COLOR*/
  66.     if(clr2==6) clr2=1;
  67.     ansic(clr1);
  68.     makewindow(wx,wy+2,width,len);
  69.     ansic(clr2);
  70.     makewindow(wx,wy,width,3);
  71.     tmp=(width-strlen(syscfg.systemname))/2;
  72.     movecsr(wx+tmp,wy+1);
  73.     sprintf(otstr,"%s",syscfg.systemname); outs(otstr);
  74.     movecsr(wx+width-8,wy+1);
  75.     sprintf(otstr,"%2ld:%-2.2ld",hr,min);  outs(otstr);
  76.     movecsr(wx+width-3,wy+1);
  77.     if(am) {
  78.       sprintf(otstr,"am");
  79.     }
  80.     else sprintf(otstr,"pm");
  81.     outs(otstr);
  82.     day=dow();
  83.     if(day==0) sprintf(d_o_w,"Sun");
  84.     if(day==1) sprintf(d_o_w,"Mon");
  85.     if(day==2) sprintf(d_o_w,"Tue");
  86.     if(day==3) sprintf(d_o_w,"Wed");
  87.     if(day==4) sprintf(d_o_w,"Thu");
  88.     if(day==5) sprintf(d_o_w,"Fri");
  89.     if(day==6) sprintf(d_o_w,"Sat");
  90.     movecsr(wx+1,wy+1);
  91.     sprintf(otstr,"%s %s",d_o_w,status.date1); outs(otstr);
  92.     ansic(clr1);
  93.     movecsr(wx+1,wy+3);
  94.     sprintf(otstr,"Calls today :       %4u",status.callstoday);
  95.     outs(otstr);
  96.     movecsr(wx+1,wy+4);
  97.     sprintf(otstr,"Actvity     :      %5.2f%%"
  98.         ,((float) status.activetoday)/14.4);
  99.     outs(otstr);
  100.     movecsr(wx+1,wy+5);
  101.     sprintf(otstr,"Mail Waiting:       %4u",fwaiting);  outs(otstr);
  102.     movecsr(wx+1,wy+6);
  103.     sprintf(otstr,"Uploads     :       %4u",status.uptoday);
  104.     outs(otstr);
  105.     movecsr(wx+1,wy+7);
  106.     sprintf(otstr,"Posts Today :       %4u",status.msgposttoday);
  107.     outs(otstr);
  108.     movecsr(wx+1,wy+8);
  109.     sprintf(otstr,"Total Users :       %4u",status.users);
  110.     outs(otstr);
  111.     movecsr(wx+1,wy+9);
  112.     sprintf(otstr,"Total Calls :      %5ld",status.callernum1);
  113.     outs(otstr);
  114.     movecsr(wx+30,wy+4);
  115.     sprintf(otstr,"Minutes     :      %4u",status.activetoday);
  116.     outs(otstr);
  117.     movecsr(wx+30,wy+5);
  118.     sprintf(otstr,"Max Users   :      %4u",syscfg.maxusers);
  119.     outs(otstr);
  120.     movecsr(wx+30,wy+6);
  121.     sprintf(otstr,"Com Port    :        %2u",syscfg.primaryport);
  122.     outs(otstr);
  123.     movecsr(wx+30,wy+7);
  124.     sprintf(otstr,"NETxx Ver   :      %4u",status.net_version);
  125.     outs(otstr);
  126.     movecsr(wx+30,wy+8);
  127.     sprintf(otstr,"WWIV Ver    :      %4u",status.wwiv_version);
  128.     outs(otstr);
  129.     movecsr(wx+30,wy+9);
  130.     sprintf(otstr,"WWIV Reg. # :     %5ld",syscfg.wwiv_reg_number);
  131.     outs(otstr);
  132.     movecsr(wx+30,wy+3);
  133.     i=3;
  134.     l=(long) freek(3);  totspace=l;
  135.     while ((l>0) && ((i+'@')<=cdir[0])) {
  136.       i++;
  137.       if ((i+'@')<=cdir[0])  {
  138.     l=(long) freek(i);
  139.     totspace+=l;
  140.       }
  141.     }
  142.     sprintf(otstr,"HD Space    : %8ldk",totspace);
  143.     outs(otstr);
  144.     ansic(0);
  145.     movecsr(0,22);
  146.   }
  147. }
  148.  
  149. STEP 3:  All the following changes/additions occur in void getcaller
  150. ------
  151. ┌──────────────────────┐
  152. │         Legend       │
  153. │! - this line changed │
  154. │+ - add this line     │
  155. │= - this there before │
  156. └──────────────────────┘
  157. -In the declaration section, make the following changes:
  158.  
  159. !  int i,i1,i2,i3,any,wfc_on, NoScreen;
  160. !  double d,d1,tstamp,tmp;
  161.  
  162. -Search for "srand((unsigned int)d);".  Then change accordingly.
  163.  
  164. =  srand((unsigned int)d);
  165. +  wfc_window(NoScreen);
  166. +  tstamp=timer();  wfc_on=1;
  167. =  do {
  168.  
  169. -Search for "attempt_callout();".  Then change accordingly.
  170.  
  171. =    if ((!any) && ((rand() % 8000)==0) && (net_sysnum) &&
  172. =                   (ok_modem_stuff)) {
  173. =      attempt_callout();
  174. +      wfc_on=0;
  175. =      any=1;
  176.  
  177. -In the switch section, add these lines
  178.  
  179. +    case '=':
  180. +      if (NoScreen) NoScreen=0;
  181. +      else NoScreen=1;
  182. +      break;
  183.  
  184. -Search for "if ((comhit())".  Change accordingly.
  185. =      }
  186. =      okskey=0;
  187. +      wfc_on=0;
  188. =    }
  189. =   if ((comhit()) && (ok_modem_stuff) && (!lokb)) {
  190.       any=1;
  191.  
  192. -Search for "giveup".  Change accordingly.
  193.  
  194. =        giveup_timeslice();
  195. =    }
  196. +    tmp=timer()-tstamp;
  197. +    if((!wfc_on) || (60<=tmp) || (0>tmp)) {
  198. +       tstamp=timer();
  199. +       wfc_on=1;
  200. +       wfc_window(NoScreen);  }
  201. =  } while ((!incom) && (!lokb) && (!endday));
  202.  
  203.  
  204. STEP 4:  Re-compile using TCC or BCC.
  205. ------
  206.  
  207. STEP 5:  Place ICE.COM into your main BBS directory.  A copy is at the end
  208. ------   of this mod.
  209.  
  210.  
  211. STEP 6:  Copy BBS.EXE, RETURN.EXE, and INIT.EXE into your main BBS directory.
  212. ------
  213.  
  214.  
  215. That's it.
  216.  
  217. DISCLAIMER:  Well, if your hard drive crashes, your BBS decides to nuke all
  218. ----------   the accounts, your sister runs away with the milkman, or you
  219.          just screwed up, DON'T BLAME ME.  This method worked great for
  220.          me.
  221.  
  222. The following is ICE.COM uuencoded.  Use UUDECODE to return it to its original
  223. state and place it into your main BBS directory.
  224.  
  225. section 1 of uuencode 5.13 of file ice.com    by R.E.M.
  226.  
  227. begin 644 ice.com
  228. M_+T@`8MN`(NF`@"+G@0`M$K-(:$L`(F&&@"+G@``_^,P`8H41@K2=`:T`LTA
  229. MZ_/#P`D6#`(!&`P9#1H.&P^?Z%)0Z)'H4!ZX1-=0N``"```;6S0P;1M;,DH;
  230. M6S([,4@;6S,[,4@;6S0[,4@;6S4[,4@;6S8[,4@;6S<[,4@;6SE#&ULP.S%M
  231. ML;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&Q
  232. ML;&QL;&QL;&QL;&QL;&QL;$;6S@[,4@;6SE#L;&QL;&QL;&QL;&QL;&QL;&Q
  233. ML;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;$;
  234. M6S,V;;&Q&ULY.S%(&ULY0QM;,S=ML;&QL;$;6S`[,S5ML;&QL;&QL;&QL;&Q
  235. ML;&QL;&QL;&QL;&QL;&QL;$;6W,*#0`;6W6QL;&QL;&QL;&QL;&QL;&QL;&Q
  236. ML;&QL;&QL1M;,3LS-VVQL1M;,S9ML;$;6S$P.S%(&ULY0QM;,S=ML;&QL;$;
  237. M6S`[,S5ML;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&Q
  238. ML;&QL;&QL;&QL;&QL;&QL1M;,3LS-VVQL1M;,S9ML;$;6S$Q.S%(&ULY0QM;
  239. M,S=ML;&QL;$;6S`[,S5ML;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&Q
  240. ML;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL1M;,3LS-VVQL1M;,S9ML;$;6S$R
  241. M.S%(&UMS"@T`&UMU&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  272. ML;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&Q
  273. ML;&Q&ULQ.S,W;;&Q&ULS-FVQL1M;,C$[,4@;6SE#&ULS-VVQL;&QL;&QL;&Q
  274. ML;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&Q
  275. ML;&QL;&QL1M;,S9ML;$*#0`;6S(R.S%(&ULQ,4.QL;&QL;&QL;&QL;&QL;&Q
  276. ML;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&Q
  277. ML1M;,C,[,4@;6S(T.S%(&ULR-3LQ2!M;,&T;6S(U-40*#0"-MB``N"(!_]"-
  278. MMB(!N"(!_]"-MB("N"(!_]"-MB0#N"(!_]"-MB8$N"(!_]"-MB,%N"(!_]"-
  279. ?MB4&N"(!_]"-MB<'N"(!_]"-MB0(N"(!_]"X`$S-(4S-
  280. `
  281. end
  282. sum -r/size 21868/3232 section (from "begin" to "end")
  283. sum -r/size 28227/2326 entire input file
  284.  
  285.  
  286.  
  287.  
  288. A special thanks to Jim #1@1 (IceNET) for the ANSI background and for the
  289. continual ideas and support.  What started as a little mod for me turned
  290. into a very nice functional mod that none of your users will appreciate, but
  291. I think you will.  If you have any questions, feel free to write me and I
  292. will get back to you.  It has been fun.....
  293.  
  294. Odin #1   IceNET@7664
  295.